package GUI.Demo01;

import java.awt.*;

public class D05 {
    public static void main(String[] args) {
        Frame frame = new Frame();

        Button west = new Button("west");
        Button north = new Button("north");
        Button south = new Button("south");
        Button center = new Button("center");
        Button east = new Button("east");
        Button fin = new Button("finlly");

        frame.setLayout(new GridLayout(3,2));

        frame.add(west);
        frame.add(south);
        frame.add(north);
        frame.add(center);
        frame.add(east);
        frame.add(fin);
        //自动布局功能(自动填充大小)
        frame.pack();
        frame.setSize(500,500);
        frame.setVisible(true);
    }
}
